#include "molecular_atom.h"
#include "molecular_core.h"
#include "molecular_atom_end_point.h"

namespace M {
Core *
Atom::GetCore()
{
    return m_pCore;
}

bool
Atom::Execute(const String &strAtomId, int nFuncId, void *pParams, void *pIOParams)
{
    return m_pCore->Execute(AtomEndPoint(name()), strAtomId, nFuncId, pParams, pIOParams);
}

bool
Atom::FireEvent(int nEventId, void *pParams)
{
    return m_pCore->FireEvent(AtomEndPoint(name()), nEventId, pParams);
}

void
Atom::Init(Core *pCore)
{
    m_pCore = pCore;
}

void
Atom::Uninit()
{
    m_pCore = NULL;
}
}